import { httpR2 } from "@/utils/http";
import type { User } from "@/types/member";
import type { UserProfileSubmitDTO } from "@/types/myInfo";

export const getUserInfo = () => {
  return httpR2<User>({
    method: "POST",
    url: "/auth/user/profile",
    data: {},
  });
};

export const updateUserInfo = (query: UserProfileSubmitDTO) => {
  return httpR2<User>({
    method: "POST",
    url: "/auth/user/update",
    data: {
      ...query
    },
  });
};
